package com.cloudweb.oa.api;

import cn.js.fan.util.ErrMsgException;
import com.alibaba.fastjson.JSONObject;

import javax.servlet.http.HttpServletResponse;

public interface ILoginUtil {

    boolean canLogin(String userName) throws ErrMsgException;

    void afterLoginFailure(String userName) throws ErrMsgException;

    void setLoginInfo(HttpServletResponse response, String userName, JSONObject json);

    void afterLoginSuccess(String userName);

    void putTokenInCache(String userName, String token);

    String getTokeByCache(String userName);

    void putMobileTokenInCache(String userName, String token);

    String getMobileTokeByCache(String userName);
}
